import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
import { PathParam } from "../../config/pathParam";

@Component({
  selector: 'app-game2019',
  templateUrl: './game2019.component.html',
  styleUrls: ['./game2019.component.css'],
  encapsulation:ViewEncapsulation.None
})
export class Game2019Component implements OnInit {
  activeTag:string;
  display1:boolean=false;
  display2:boolean=false;
  display3:boolean=false;
  game2019_video = PathParam.video_url+"game2019_fd";
  game2019_jump_video = PathParam.video_url+"jump";
  game2019_rope_video = PathParam.video_url+"rope";
  game2019_video_url:any;
  game2019_jump_url:any;
  game2019_rope_url:any;
  constructor(public domSanitizer:DomSanitizer) { }

  ngOnInit(): void {
    this.activeTag="introduction";
    this.game2019_video_url =this.domSanitizer.bypassSecurityTrustResourceUrl(this.game2019_video);
    this.game2019_jump_url =this.domSanitizer.bypassSecurityTrustResourceUrl(this.game2019_jump_video);
    this.game2019_rope_url =this.domSanitizer.bypassSecurityTrustResourceUrl(this.game2019_rope_video);
  
  }

  turn2introduction(){
    this.activeTag="introduction";
  }
  turn2preparation(){
    this.activeTag="preparation";
  }
  turn2climax(){
    this.activeTag="climax";
  }

  showVideo(videoname){
    if(videoname=='gamevideo'){
      this.display1 = true;
    }
    else if(videoname=='rope'){
      this.display2 = true;
    }
    else if(videoname=='jump'){
      this.display3 = true;
    }
    
  }
}
